feat(fast-inbox): streaming inbox propose validation, unwired (A-1378) - #24773
Closed
spalladino wants to merge 7 commits into
Closed
feat(fast-inbox): streaming inbox propose validation, unwired (A-1378)#24773spalladino wants to merge 7 commits into
spalladino wants to merge 7 commits into
Conversation
spalladino
force-pushed
the
spl/a-1377-inbox-buckets
branch
from
July 17, 2026 19:38
630c509 to
20656f8
Compare
spalladino
force-pushed
the
spl/a-1378-propose-validation
branch
from
July 17, 2026 19:38
aa85a03 to
531e71a
Compare
spalladino
force-pushed
the
spl/a-1377-inbox-buckets
branch
from
July 17, 2026 20:04
20656f8 to
d12875f
Compare
spalladino
force-pushed
the
spl/a-1378-propose-validation
branch
from
July 17, 2026 20:04
531e71a to
b011406
Compare
spalladino
force-pushed
the
spl/a-1377-inbox-buckets
branch
from
July 17, 2026 23:29
d12875f to
68714ab
Compare
spalladino
force-pushed
the
spl/a-1378-propose-validation
branch
2 times, most recently
from
July 18, 2026 04:52
57ce718 to
b853b87
Compare
spalladino
force-pushed
the
spl/a-1377-inbox-buckets
branch
from
July 18, 2026 05:22
ec1326a to
db14374
Compare
spalladino
force-pushed
the
spl/a-1378-propose-validation
branch
2 times, most recently
from
July 19, 2026 14:05
6e642ec to
a003504
Compare
spalladino
force-pushed
the
spl/a-1377-inbox-buckets
branch
from
July 19, 2026 14:05
db14374 to
a93a3eb
Compare
spalladino
force-pushed
the
spl/a-1378-propose-validation
branch
from
July 19, 2026 17:57
a003504 to
e1600a5
Compare
spalladino
force-pushed
the
spl/a-1377-inbox-buckets
branch
2 times, most recently
from
July 19, 2026 20:48
9be7a9f to
695a55a
Compare
spalladino
force-pushed
the
spl/a-1378-propose-validation
branch
2 times, most recently
from
July 20, 2026 15:30
5088258 to
d904bee
Compare
spalladino
force-pushed
the
spl/a-1377-inbox-buckets
branch
from
July 20, 2026 17:28
13d85e2 to
d747a5c
Compare
spalladino
force-pushed
the
spl/a-1378-propose-validation
branch
2 times, most recently
from
July 20, 2026 21:21
41e7506 to
a5484bb
Compare
spalladino
force-pushed
the
spl/a-1377-inbox-buckets
branch
from
July 20, 2026 21:21
d747a5c to
27e2670
Compare
spalladino
force-pushed
the
spl/a-1378-propose-validation
branch
from
July 21, 2026 02:58
a5484bb to
5a9c4e0
Compare
spalladino
force-pushed
the
spl/a-1377-inbox-buckets
branch
2 times, most recently
from
July 21, 2026 03:39
258788d to
e7fa949
Compare
spalladino
force-pushed
the
spl/a-1378-propose-validation
branch
2 times, most recently
from
July 27, 2026 20:53
7f41bee to
df088ff
Compare
…itten-hint test (A-1378)
Place the IInbox import after IRollup so solhint's imports-order rule passes.
… (A-1378) Remove the transitional skip added at the per-block-bundle branch. multi_proof was observed passing in CI at this content (2-CPU, 65s on 2026-07-19) and passes on next/merge-train, so the constrained-CPU slowdown introduced earlier in the stack is resolved by here. The skip stays protective over the intervening branches where we have no passing observation; from this branch upward the test runs normally.
… spec reference (A-1378)
…(A-1378) A bucket keeps absorbing messages for the whole L1 block that opened it, so a reference to the current bucket is not a reference to any lasting snapshot. A lone designated proposer could bundle send(A) -> propose(hash-after-A) -> send(B) into one L1 transaction: L1 accepts the checkpoint, then the trailing send overwrites the bucket in place, leaving the checkpoint committed to a rolling hash that exists neither on L1 nor in any node, since nodes only ever observe a bucket's end-of-block state. No honest node can resolve the consumed position, so the pending chain stalls until the checkpoint is pruned. validateInboxConsumption now requires the referenced bucket to be settled, which is the negation of the Inbox's own rollover condition: the genesis bucket (which never absorbs), a bucket whose L1 block has passed, or a full bucket whose successor takes the next message. The per-bucket cap moves to IInbox.sol so the Inbox and the propose path share one definition without the rollup libraries depending on the Inbox implementation. Honest proposers never reference a bucket younger than INBOX_LAG_SECONDS, so nothing legitimate is excluded.
spalladino
force-pushed
the
spl/a-1378-propose-validation
branch
from
July 28, 2026 12:37
df088ff to
e5284d7
Compare
Contributor
Author
|
Superseded by #25036. The Fast Inbox stack has been regrouped from 20 per-issue PRs (plus 2 umbrellas) down to 3 area PRs plus an umbrella, and rebased onto New structure: #25036 (circuits + L1) → #25037 (node + flip) → #25038 (cleanup), with #25039 as the full-stack umbrella. The original branch for this PR is left on the remote as a recovery point. Closing here to cut the rebase and review overhead of maintaining 22 PRs; the work is not abandoned. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #24771 (A-1377). AZIP-22 Fast Inbox, FI-08.
What
Implements the AZIP's censorship assert as
ProposeLib.validateInboxConsumption— a new library function that is not yet called: today'sinbox.consume()/inHashcheck inproposeis untouched, so this is dead code until the flip wires it in.Given the checkpoint header's
inboxRollingHash, an unsigned calldata bucket hint, the proposed slot, and the parent checkpoint's cumulative consumed total (which the flip will source from the temp checkpoint log), the function enforces:inbox.getBucket(hint)(Rollup__InvalidInboxRollingHash). The hint is a lookup aid only — a wrong hint reverts, it cannot change what gets accepted — andgetBucketitself rejects hints beyond the current bucket or already overwritten in the ring. A checkpoint consuming nothing references the same bucket as its parent (the genesis bucket for the first checkpoint), so there is no base case.hint + 1) must be absent, past the cutoff, or cap-escaped (Rollup__UnconsumedInboxMessages). The cutoff is the build-frame start minusINBOX_LAG_SECONDS: a checkpoint proposed in slot S is built during slot S-1 (proposer pipelining), and validators are not required to act on buckets younger than one L1 slot at build start, socutoff = toTimestamp(S-1) - 12. Cap escape allows stopping when consuming through the next bucket would exceedMAX_L1_TO_L2_MSGS_PER_CHECKPOINT(1024) messages since the parent's total. Both comparisons are exact-boundary tested.The function performs no Inbox write. It is a pure
viewthat returns the consumed cumulative total (bucket.totalMsgCount). The flip (FI-14) stores that consumed position as part of the per-checkpoint temp-log record, extended to{inboxRollingHash, inboxMsgTotal, inboxConsumedBucket}and written bypropose; that record is the authoritative consumed position and is prune-consistent, since temp logs rewind with the pending chain. Two new checks guard the returned value: consumption must move forward (Rollup__InboxConsumptionBehindParent, equal allowed — a proposal cannot consume behind its parent, and the check precedes the delta subtractions so a backwards proposal reverts descriptively rather than underflowing), and the consumed delta cannot exceedMAX_L1_TO_L2_MSGS_PER_CHECKPOINTin one checkpoint (Rollup__TooManyInboxMessagesConsumed). The Inbox-side proven-consumed cache that ring overwrite protection needs moved to FI-20, anchored to the proven tip rather than the pending chain (decided 2026-07-17): a pointer advanced with the pending chain is not prune-safe, since after a prune it would sit ahead of what the replacement chain consumed.INBOX_LAG_SECONDS = 12andMAX_L1_TO_L2_MSGS_PER_CHECKPOINT = 1024are defined at file level inProposeLibfor now; they mirror the protocol constants and should move into the generatedConstantslibrary once the Solidity emitter allow-list includes them.Testing
New
ProposeInboxConsumption.t.sol(15 tests) drives the library function through a harness that owns the Inbox and TimeLib storage, covering the roadmap done-when plus boundaries:Rollup__TooManyInboxMessagesConsumed),Rollup__InboxConsumptionBehindParent; an equal reference consumes nothing and returns the unchanged total),The three former consumed-pointer tests are removed along with the pointer. Full
forge testat the current rebased tip: 890 passed, 0 failed, 3 skipped (the previously notedtestGetEpochProofPublicInputsVerifiesHeadersfailure inherited from the base has since been fixed).